﻿CREATE PROCEDURE [dbo].[Hogar_Cargo_Insertar]   
 @Codigo VARCHAR(20)
AS 
BEGIN

/*****************************************************************************************************************************************/
-- Author: Carlos Mendoza
-- Purpose:   crea un nuevo cargo
-- Returns:    Cargo
/*****************************************************************************************************************************************/ 
	
	DECLARE @CargoId int

	INSERT INTO [dbo].[Cargo]
				(Codigo)
	VALUES (@Codigo)

	SET @CargoId = IDENT_CURRENT('Cargo')

	SELECT  [CargoId],
			[Codigo]
	FROM	[dbo].[Cargo] WITH (NOLOCK)
	WHERE [CargoId] = @CargoId
	
END